#ifndef MYLABEL_H
#define MYLABEL_H

#include <QWidget>
#include <QLabel>
#include <QEvent>
#include <QMouseEvent>

class MyLabel : public QLabel
{
    Q_OBJECT
public:
    explicit MyLabel(QWidget *parent = nullptr);

    // 鼠标进入事件：加上 override，明确重写父类虚函数
    void enterEvent(QEnterEvent* event) override;
    // 鼠标离开事件：同理
    void leaveEvent(QEvent* event) override;

    //鼠标移动事件
    void mousePressEvent(QMouseEvent* ev);

signals:
};

#endif // MYLABEL_H
